
import AbsWindow from "../../framework/AbsWindow";
import {WindowName} from "../../framework/reflect/WindowName";
import { shareUtil } from "../../framework/wx/ShareUtil";
const {ccclass, property} = cc._decorator;
@ccclass
@WindowName("MidasTouchWindow")
export default class MidasTouchWindow extends AbsWindow {

    @property(cc.Node)
    private returnBtn:cc.Node=null
    @property(cc.Node)
    private shareBtn:cc.Node = null;

    public onStart() {
        this.setClickListener(this.returnBtn,this.onReturnBtn);
        this.setClickListener(this.shareBtn,this.onShareBtn);
    }

    public listen(): string[] {
        return []
    }

    public handleMessage(message: string, args: any[]): boolean {
        switch (message) {
        }
        return false
    }
    private onShareBtn(){
        shareUtil.share();
    }
    private onReturnBtn(){
        this.context.closeWindow(MidasTouchWindow);
    }
}